Intelligent Home Monitoring System (IHMS) - Code Directory Structure

Project Description

  The Intelligent Home Monitoring System (IHMS) is a full-stack capstone
  project for monitoring connected devices, viewing power usage, tracking
  runtime, adding devices, displaying alerts, and demonstrating emergency
  shutoff behavior.

  The project is organized into separate frontend, backend, database, and
  documentation folders so each part of the system can be reviewed and run
  independently.


Top-Level Directory Structure

  client/

    Contains the frontend application built with React, TypeScript, Vite,
    and Tailwind CSS.

    This directory handles:
      - User interface screens
      - Dashboard layout
      - Device cards
      - Device detail modal
      - Add device flow
      - Timer and alert interactions
      - Frontend API communication with the backend


  server/

    Contains the backend API built with Node.js and Express.

    This directory handles:
      - API routes for device data
      - Backend server startup
      - PostgreSQL database connection
      - Device create, read, update, and delete operations
      - Automatic database initialization for demo safety


  database/

    Contains SQL scripts used to create and populate the PostgreSQL database.

    This directory includes:
      - ihms_database.sql

    The SQL file can be used to recreate the devices table and insert the
    demo device data for grading, testing, or local setup.


How the Components Work Together

  The frontend in client/ displays the IHMS user interface and sends requests
  to the backend API.

  The backend in server/ receives frontend requests, processes device data,
  and communicates with the PostgreSQL database.

  The database stores device information such as device name, type, status,
  power usage, alert state, timer value, and runtime.

  The database/ folder provides a reproducible SQL setup file so the database
  can be recreated for grading or demonstration.

  The Documentation/ folder provides written instructions for installing,
  running, deploying, and using the system.
